package com.ynkbny.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.ynkbny.mapper.JobAndTriggerMapper;
import com.ynkbny.domain.JobAndTrigger;
import com.ynkbny.service.IJobAndTriggerService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

/**
 * @author zelin.wang
 * @description
 * @date 7/18/2023
 */
@Service
public class IJobAndTriggerServiceImpl implements IJobAndTriggerService {
    @Resource
    JobAndTriggerMapper jobAndTriggerMapper;
    @Override
    public PageInfo<JobAndTrigger> getJobAndTriggerDetails(Integer pageNum, Integer pageSize) {
        PageHelper.startPage(pageNum, pageSize);
        List<JobAndTrigger> list = jobAndTriggerMapper.getJobs();
        PageInfo<JobAndTrigger> page = new PageInfo<>(list);
        return page;
    }
}
